<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>1</title>
	</head>
	<body>
		<div name="d1">1</div>
		<div name="d1">2</div>
		<div name="d1">3</div>
		
		<script>
			var divs=document.getElementsByName("d1");
			alert(divs.length);
		</script>
	</body>
</html>
